from django.contrib import admin
from django.urls import include, path
from bbs import views
from django.conf.urls import url

urlpatterns = [
    # path('admin/', admin.site.urls),
    # url(r'^all/', views.all_tie),  # 全部帖子
    url(r'^$', views.home),  # 设置默认主页

    url(r'^all-(?P<kid>\d+)-(?P<reply_limit>\d+)-(?P<time_limit>\d+)', views.all_tie),  # 按条件搜索帖子
    url(r'^home/', views.home),  # 主页
    url(r'^login/', views.login),  # 登录
    url(r'^logout/', views.logout), # 登出
    url(r'^register/', views.register), # 注册
    url(r'^user-info/', views.user_info),  # 个人中心
    url(r'^publish/', views.publish),  # 发布帖子
    url(r'^single/(?P<tid>\d+)/', views.single),  # 单个帖子
    url(r'^like/', views.like),  # 点赞
    url(r'^edit-pwd/', views.edit_pwd),  # 修改密码
    url(r'^edit-user-info/', views.edit_user_info),  # 修改用户信息
    url(r'^my-admin/', views.admin),  # 管理员界面
    url(r'^announcement/', views.announcement),  # 公告管理
    url(r'^admin-home/', views.topic_manage),  # 帖子管理，也是主页面
    url(r'^kind-manage/', views.kind_manage),  # 板块管理
    url(r'^file-manage/', views.file_manage),  # 文件共享管理
    url(r'^room-manage/', views.room_manage),  # 房间管理
    url(r'^single-an-(?P<aid>\d+)/', views.single_an),  # 单个公告显示
    url(r'^manage-blog/', views.manage_blog),  # 个人博客管理
    url(r'^my-friends', views.get_friends),  # 个人好友列表
    url(r'^add-friend/', views.add_friend),  # 添加好友
    url(r'^get-request/', views.get_request),  # 好友申请
    url(r'mdeditor/', include('mdeditor.urls')),

]


